<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class WarehouseOut extends Model
{
    use HasFactory;

    protected $fillable = ['company_id','project_id','admin_id','labor_team_id','labor_company_id','warehouse_id','type','name','encoding','number','brand','specification','unit','restricted_quantity','quantity','part_used','remarks','donor','draw_date'];
    const POSTONLY = ['company_id','project_id','admin_id','labor_team_id','labor_company_id','warehouse_id','type','name','encoding','number','brand','specification','unit','restricted_quantity','quantity','part_used','remarks','donor','draw_date'];

    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
    }

}
